import os
basedir = os.path.abspath(os.path.dirname(__file__))

login_information=[]

def panduan(zhanghao,mima):
    with open(os.path.join(basedir,'data.txt'),'r') as b:
        for i in b:
            a=i.split("|")
            login_information.append(a)
    for item in login_information:
        if int(item[0]) == zhanghao and int(item[1]) == mima:
            return "true"

def log_login(zhanghao,mima):
    print(os.path.join(basedir,'data.txt'))
    a = open(os.path.join(basedir,'data.txt'),mode='a')
    a.write("%s|%s\n"%(zhanghao,mima))
    a.close()
